<?php

namespace app\topics\controller;

class ReplyController extends \app\topics\controller\TopicsController {

    protected $_middle = 'topics/Reply';


    public function index() {
        target($this->_middle, 'middle')->setParams([
            'data' => request('post'),
            'user_id' => $this->userInfo['user_id']
        ])->post()->export(function ($data, $msg) {
            $this->success($msg, url($_POST['url'], ['id' => $_POST['detail_id']]));
        }, function ($message, $code, $url) {
            $this->errorCallback($message, $code, $url);
        });
    }


}